package com.jujia.tmall.adapter;

import android.content.Context;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.jujia.tmall.activity.R;
import com.jujia.tmall.base.SealConst;
import com.jujia.tmall.entity.OrderListSource;

import java.util.List;


public class MainOrderListAdapter extends BaseQuickAdapter<OrderListSource, BaseViewHolder> {
    private Context context;

    public MainOrderListAdapter(List<OrderListSource> data, Context context) {
        super(R.layout.fragment_rec_evaluate_item, data);
        this.context = context;
    }


    @Override
    protected void convert(com.chad.library.adapter.base.BaseViewHolder baseViewHolder, final OrderListSource mOrderListSource, int position) {

        baseViewHolder.setText(R.id.frei_code, mOrderListSource.getTBID())
                .setText(R.id.frei_name, mOrderListSource.getNAME())
                .setText(R.id.frei_order_id, mOrderListSource.getID())
                .setText(R.id.frei_user_phone, mOrderListSource.getPHONE())
                .setText(R.id.frei_order_type, SealConst.hasLogo(mOrderListSource.getLOGO() + ""))
                .setText(R.id.frei_first_time, mOrderListSource.getFYYTIME() + "")
                .setText(R.id.frei_service_time, mOrderListSource.getSERVICEDATE() + "")
                .setText(R.id.frei_order_status, SealConst.hasOrderStatus(mOrderListSource.getSIGN() + ""))
                .setText(R.id.frei_user_address, mOrderListSource.getADDRESS())
                .setText(R.id.frei_is_send_home, SealConst.hasSendHome(mOrderListSource.getDHSM() + ""))
        ;


    }

}

